﻿<%@ Page Title="" Language="C#" MasterPageFile="~/admin/main/AdminBase.Master" AutoEventWireup="true" CodeBehind="list_module.aspx.cs" Inherits="Com.Ompchina.Web.admin.system.list_module" %>
<%@ Import Namespace="System.Collections.Generic" %>
<%@ Import Namespace="Model.AuthModel" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cph_header" runat="server">
<script type="text/javascript">
    $(function () {
        Init.tableList(".list");
    })
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cph_pagename" runat="server">
    权限配置 &gt; <%= base.ConvertAction("模块") %>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="cph_pagelink" runat="server">
    <li><a href="add_module.aspx?action=add">新增模块</a></li>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="cph_main" runat="server">
<form runat="server" id="frm_listModule">
<table class="table list" cellpadding="0" cellspacing="0">
    <tr>
        <th class="w100">搜索条件：</th>
    	<td class="item">
    	    模块分类：<CustomUI:ModuleTypeDDL ID="ddlType" runat="server"></CustomUI:ModuleTypeDDL>&nbsp;&nbsp;
    	    关键字：<asp:TextBox ID="txtKey" runat="server" CssClass="ipttxt w180 h20"></asp:TextBox>&nbsp;&nbsp;
            <asp:Button ID="txtSearch" runat="server" Text="过滤" onclick="txtSearch_Click" />
    	</td>
    </tr>
</table>
</form>
<br /><br />
<table class="table list" cellpadding="0" cellspacing="0">
	<tr>
	    <th>所属类别</th>
    	<th>模块名称</th>
        <th>模块地址</th>
        <th class="center w100">操作</th>
    </tr>
    <%
        int recordCount = 0, pageSize = 20;
        IList<ModuleInfo> list = this._GetModule(pageSize, out recordCount);
        if (list != null && list.Count > 0) 
        {
            int i = 1;
            foreach (ModuleInfo info in list) 
            {
                string css = string.Empty;
                css = i++ % 2 == 1 ? "item" : "aitem";
                %>
                <tr class="<%= css %>">
                    <td><a href="list_module.aspx?action=list&typeid=<%= info.ModuleType.ModuleTypeID %>"><%= info.ModuleType.ModuleTypeName %></a></td>
                    <td><%= Server.HtmlDecode(info.ModuleName) %></td>
                    <td><%= Server.HtmlDecode(info.ModuleLink) %></td>
                    <td class="center"><a href="add_module.aspx?action=update&id=<%= info.ModuleID %><%= base.GetQueryString() %>">修改</a></td>
                </tr>
                <%
            }
        }
    %>
    <tr>
        <th colspan="4" class="pager">
            <%
                Com.Ompchina.Lib.Text.Pager.ResponsePager(Response, "list_module.aspx"
                    , string.Format("action=list{0}", base.GetQueryString())
                    , true, true, true, true, PageIndex, pageSize, recordCount, 5); %>
       </th>
    </tr>
</table>
</asp:Content>
